#ifndef GPLATEAU_H
#define GPLATEAU_H

#include <QtCore/QVector>
#include <QtGui/QGraphicsView>
#include <QtGui/QGraphicsScene>

class GCase;
class QGraphicsSimpleTextItem;
class QGraphicsTextItem;

class GPlateau : public QGraphicsScene {
    Q_OBJECT

public:
    explicit GPlateau(QObject *parent = 0);
	virtual ~GPlateau();

	void afficherNouvellePartie(QString pNomJ1, QString pNomJ2);

signals:
    void signalCaseChoisie(int);

public slots:
    void refreshNbGraines(int pNumCase, int pNbGraines);
    void onCaseClicked(GCase* pClickedObject);

private:
    QVector<GCase*> m_listeCases;
    QVector<QGraphicsSimpleTextItem*> m_listeAffichageNbGraines;

    int getNumeroCaseFromObject(GCase* pClickedObject);
	void jouerTour(int pNumCase);

	QGraphicsTextItem *m_nomJoueur1;
	QGraphicsTextItem *m_nomJoueur2;
};

#endif // GPLATEAU_H
